package com.lx.bbs.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lx.bbs.entity.Store;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StoreMapper extends BaseMapper<Store> {

    @Select("SELECT\n" +
            "	b.tid \n, " +
            "	c.title \"topic.title\" " +
            "FROM\n" +
            "	tbl_user a,\n" +
            "	tbl_store b,\n" +
            "	tbl_topic c \n" +
            "WHERE\n" +
            "	a.id = b.uid \n" +
            "	AND b.tid = c.id \n" +
            "	AND a.id = #{id}")
    List<Store> getStore(@Param("id") int id);

}
